package com.wkbb.basic.mapper;

import com.wkbb.basic.model.Agent;
import com.wkbb.basic.model.Organization;
import com.wkbb.common.base.BaseMapper;
import com.wkbb.common.dto.basic.OrganizationDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrganizationMapper extends BaseMapper<Organization> {

    OrganizationDto getOrgInfoById(Long id);

    List<OrganizationDto> getOrgInfoList(Map<String, Object> params);

    void updateBack(Organization entity);

    Organization getNewOrgByOld(Long oldOrgId);

    List<OrganizationDto> getNewOrgListByOldIds(@Param("oldOrgIds") List<Long> oldOrgIds);

    List<OrganizationDto> getOrgListByPage(Map<String, Object> params);

    OrganizationDto getAgentInfoByUserId(Map<String, Object> params);

    OrganizationDto getOrgInfoByUserId(Map<String, Object> params);

    List<Map<String, Object>> getOrgCountByType(Map<String, Object> paramsMap);

    void deleteById(Long orgId);

    List<Organization> getOrgListByType(Map<String, Object> paramsMap);

    List<Map<String, Object>> getOrgCountStatByOrgan(Map<String, Object> params);

    List<Map<String, Object>> getOrgListByOrgan(Map<String, Object> params);

    List<Map<String, Object>> getOrgDataStat(Map<String, Object> params);

    List<OrganizationDto> getOrgListByCity(Map<String, Object> params);

    Map<String, Integer> getOrgDataCount(Map<String, Object> params);

    Map<String, Object> getOrganizationCount();

    int insertOrganizationInfo(Agent data);
    int findOrganizationInfo(Agent data);
    int updateOrganizationInfo(Agent data);

    Agent getOrganizationInfoByMapParams(Map<String, Object> params);

    List<Agent> getAgentList(Map<String, Object> params);

    Agent getAgentById(@Param("id") Integer id);
}